<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link href="../reset.css" rel="stylesheet"/>
        <link href="./style.css" rel="stylesheet"/>

        <title>MixItUp Demo - Sorting by Attribute</title>
    </head>
    <body>
        <div class="controls">
            <button type="button" class="control" data-sort="published-date:asc">Asc</button>
            <button type="button" class="control" data-sort="published-date:desc">Desc</button>
        </div>

        <div class="container">
            <div class="mix" data-published-date="2016-10-12"></div>
            <div class="mix" data-published-date="2016-09-03"></div>
            <div class="mix" data-published-date="2016-05-22"></div>
            <div class="mix" data-published-date="2016-05-19"></div>
            <div class="mix" data-published-date="2016-04-30"></div>
            <div class="mix" data-published-date="2016-04-24"></div>
            <div class="mix" data-published-date="2016-03-12"></div>
            <div class="mix" data-published-date="2016-01-01"></div>

            <div class="gap"></div>
            <div class="gap"></div>
            <div class="gap"></div>
        </div>

        <script src="../mixitup.min.js"></script>

        <script>
            var containerEl = document.querySelector('.container');

            var mixer = mixitup(containerEl, {
                load: {
                    sort: 'published-date:desc'
                }
            });
        </script>
    </body>
</html>